package com.example.datastorage;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class RegisterActivity extends AppCompatActivity {

    private EditText editAgeRe;
    private EditText editSexRe;
    private EditText editNameRe;
    private EditText editPwdRe;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);


        editAgeRe = (EditText) findViewById(R.id.editAge_re);
        editSexRe = (EditText) findViewById(R.id.editSex_re);
        editNameRe = (EditText) findViewById(R.id.editName_re);
        editPwdRe = (EditText) findViewById(R.id.editPwd_re);

    }

    public void onClick(View view) {

        Intent intent = getIntent();
        intent.putExtra("user",editNameRe.getText().toString());
        intent.putExtra("pwd",editPwdRe.getText().toString());
        intent.putExtra("age",editAgeRe.getText().toString());
        intent.putExtra("sex",editSexRe.getText().toString());
        setResult(Activity.RESULT_OK,intent);
        finish();
    }
}